package com.xbongbong.pro.message.factory;/*/*/

import com.xbongbong.pro.message.base.AbstractPushSet;
import com.xbongbong.pro.message.pushset.AssemblePushSet;
import com.xbongbong.pro.message.pushset.CommunicatePlanPushSet;
import com.xbongbong.pro.message.pushset.CommunicatePushSet;
import com.xbongbong.pro.message.pushset.ContractPushSet;
import com.xbongbong.pro.message.pushset.ContractRemindPushSet;
import com.xbongbong.pro.message.pushset.CustomerAttrPushSet;
import com.xbongbong.pro.message.pushset.CustomerContactPushSet;
import com.xbongbong.pro.message.pushset.CustomerPushSet;
import com.xbongbong.pro.message.pushset.InstockPushSet;
import com.xbongbong.pro.message.pushset.InventoryPushSet;
import com.xbongbong.pro.message.pushset.InvoicePushSet;
import com.xbongbong.pro.message.pushset.OpportunityPushSet;
import com.xbongbong.pro.message.pushset.OutstockPushSet;
import com.xbongbong.pro.message.pushset.PayPlanPushSet;
import com.xbongbong.pro.message.pushset.PaymentRemindPushSet;
import com.xbongbong.pro.message.pushset.PurchasePushSet;
import com.xbongbong.pro.message.pushset.RefundPushSet;
import com.xbongbong.pro.message.pushset.ReturnPurchasePushSet;
import com.xbongbong.pro.message.pushset.SalePushSet;
import com.xbongbong.pro.message.pushset.SignInPushSet;
import com.xbongbong.pro.message.pushset.StockPushSet;
import com.xbongbong.pro.message.pushset.SupplierContactPushSet;
import com.xbongbong.pro.message.pushset.SupplierPushSet;
import com.xbongbong.pro.message.pushset.TransferPushSet;
import com.xbongbong.pro.message.pushset.WarehousePushSet;
import com.xbongbong.pro.message.pushset.WorkOrderPushSet;
import com.xbongbong.pro.message.pushset.WorkReportPushSet;

/**
 * 消息工厂
 *
 * @author GuoJun.HU
 * @since V1.0
 * @date 2019/2/19 10:43
 */
public class FactoryPushSet extends AbstractFactoryEntity {

    @Override
    public AbstractPushSet createPushSet(Integer type) {
        AbstractPushSet retEntity;

        //TODO 实际实现时删除没用的成员属性
        switch (type) {
            //crm消息推送类型
            case 3:
                //客户消息推送
                retEntity = new CustomerPushSet();
                break;
            case 14:
                //客户联系人消息推送
                retEntity = new CustomerContactPushSet();
                break;
            case 11:
                //客户自定义消息推送
                retEntity = new CustomerAttrPushSet();
                break;
            case 4:
                //销售机会消息推送
                retEntity = new OpportunityPushSet();
                break;
            case 2:
                //访客计划消息推送
                retEntity = new CommunicatePlanPushSet();
                break;
            //目前没有
//			case 8:
//				//访客计划提醒
//				retEntity = new CommunicatePlanRemindPushSet();
//				break;
            case 5:
                //跟进记录消息推送
                retEntity = new CommunicatePushSet();
                break;
            case 6:
                //合同消息推送
                retEntity = new ContractPushSet();
                break;
            case 9:
                //合同到期提醒推送
                retEntity = new ContractRemindPushSet();
                break;
            case 10:
                //回款提醒推送
                retEntity = new PaymentRemindPushSet();
                break;
            case 16:
                //发票消息推送
                retEntity = new InvoicePushSet();
                break;
            case 1:
                //销售简报消息推送
                retEntity = new SalePushSet();
                break;
            case 19:
                //退货退款消息推送
                retEntity = new RefundPushSet();
                break;

            //jxc消息推送类型
            case 107:
                //供应商消息推送
                retEntity = new SupplierPushSet();
                break;
            case 108:
                //采购联系人消息推送
                retEntity = new SupplierContactPushSet();
                break;
            case 90:
                //采购合同消息推送
                retEntity = new PurchasePushSet();
                break;
            case 200:
                //付款计划消息推送
                retEntity = new PayPlanPushSet();
                break;
            case 100:
                //采购退货单消息推送
                retEntity = new ReturnPurchasePushSet();
                break;
            case 110:
                //装配出入库消息推送
                retEntity = new AssemblePushSet();
                break;
            case 105:
                //调拨单消息推送
                retEntity = new TransferPushSet();
                break;
            case 106:
                //盘点单消息推送
                retEntity = new InventoryPushSet();
                break;
            case 104:
                //出库单消息推送
                retEntity = new OutstockPushSet();
                break;
            case 103:
                //入库单消息推送
                retEntity = new InstockPushSet();
                break;
            case 109:
                //仓库消息推送
                retEntity = new WarehousePushSet();
                break;
            case 26:
                //库存消息推送
                retEntity = new StockPushSet();
                break;

            //协同办公消息推送
            case 33:
                //签到消息推送
                retEntity = new SignInPushSet();
                break;
//			case 7:
//				//审批消息推送
//				retEntity = new ApprovalPushSet();
//				break;
            case 22:
                //工单消息推送
                retEntity = new WorkOrderPushSet();
                break;
            case 12:
                //工作报告消息推送
                retEntity = new WorkReportPushSet();
                break;
            default:
                return null;
        }

        return retEntity;
    }

}
